package com.wn.ziroombackend.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wn.ziroombackend.entity.Image;
import com.wn.ziroombackend.mapper.ImageMapper;
import com.wn.ziroombackend.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-23 02:27:54
 */
@Service
public class ImageServiceImpl extends ServiceImpl<ImageMapper, Image> implements ImageService {

    private ImageMapper imageMapper;

    @Autowired
    public void setImageMapper(ImageMapper imageMapper) {
        this.imageMapper = imageMapper;
    }

    @Override
    public int addNewImage(int productionId, String image) {
        return imageMapper.insertNewImage(productionId,image);
    }

    @Override
    public int editImage(Integer imageId, String image) {
        return imageMapper.updateImage(image,imageId);
    }


}
